import { memo } from "react";
import useAuth from "../../hooks/useAuth";
import ThemeToggle from "../ThemeToggle";
import HeaderLogin from "./headerLogin";
import { HeaderRightContainer } from "./styled";

export default memo(function HeaderRight () {
    const { profile } = useAuth()
    return <HeaderRightContainer>
        {
            !profile?.userId
                ? <HeaderLogin />
                : <img src={profile.avatarUrl} />
        }
        <ThemeToggle />
    </HeaderRightContainer>
})